const { localStorage } = window
const USERINFO = "userInfo"

export function savaUser(user){
    const strUser = JSON.stringify(user)
    localStorage.setItem(USERINFO,strUser)
    return null
}

export function getUser(){
    const obj = localStorage.getItem(USERINFO)
    return JSON.parse(obj) || {}
}

export function removeUser(){
    localStorage.removeItem(USERINFO)
    return null
}